<?php
define('ALL', 0);
define('DEBUG', 100);
define('INFO', 200);
define('WARN', 300);
define('ERROR', 400);
define('OFF', 1000);
final class XLog{
	private static $instance = null;
	private $logger = null;
	
	private function __construct() {
	}
	
	/**
	 * @return XLog
	 */		
	public static function singleton() {
		if (!self::$instance) {
			self::$instance = new self;
		}
		return self::$instance;
	}
		
	/**
	 * @param XLogger $logger
	 * @return XLog
	 */
	public function setLogger(XLogger $logger) {
		$this->logger = $logger;
		return $this;
	}

	/**
	 * @return XLogger
	 */
	public function logger() {
		return $this->logger;
	}
}
?>